#ifndef __MAIN_H
#define __MAIN_H

#include <stdint.h>
#include <stdio.h>
#include <unistd.h>
#include <wiringPi.h>
#include <wiringSerial.h>

//result
#define SUCCESS		0
#define ERR			1

#define RESP_ERR	10
#define TYPE_ERR	11
#define DIST_ERR	101

//server_cmd type
#define DIST_CMD_TYPE		('X')
#define TEMP_CMD_TYPE		('W')
#define EVRM_CMD_TYPE		('H')
#define ACCE_CMD_TYPE		('Q')
#define DIST_RESP_LEN		14
#define TEMP_RESP_LEN		8
#define EVRM_RESP_LEN		14
#define ACCE_RESP_LEN		8

//driver_cmd type
#define UP_CMD_TYPE			('U')
#define LEFT_CMD_TYPE		('L')
#define RIGHT_CMD_TYPE		('R')
#define DOWN_CMD_TYPE		('D')

#endif